﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace C4DevContest
{
    class RandomPlayer : IConnect4AI
    {
        private GamePiece aPiece;

        public int GetMove(Connect4Board board)
        {
            Random Rnd = new Random();

            int Move = Rnd.Next(7);

            while (!board.IsValidMove(Move))
                Move = Rnd.Next(7);


            return Move;
        }

        public string GetAIName()
        {
            return "Captain Chaos";
        }

        public GamePiece GetMyGamePiece()
        {
            return aPiece;
        }

        public void SetMyGamePiece(GamePiece myPiece)
        {
            aPiece = myPiece;
        }
    }
}
